﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataVisit.Model;
using NHibernate.Transform;
using System.Collections;

namespace DataVisit.DAL.ReportData
{
    public class DRental_child: AbstractSupportDal<IProjectModel>
    {
        /// <summary>
        /// 租赁金额统计分析
        /// </summary>
        /// <param name="dzName">队组名称</param>
        /// <returns>金额统计分析</returns>
        public IList GetRental(string dzName) 
        {
            try
            {
                return Session.GetNamedQuery("GetRenatal_child")
                    .SetString("dzName",dzName)
                    .SetResultTransformer(Transformers.AliasToEntityMap).List();
            }
            catch 
            {
                return null;
            }
        }

        /// <summary>
        /// 租赁数量统计分析
        /// </summary>
        /// <param name="EquipmentName">队组名称</param>
        /// <returns>租赁数量统计分析</returns>
        public IList GetRentalCount(string EquipmentName) 
        {
            try
            {
                return Session.GetNamedQuery("GetRenatal_child_count")
                    .SetString("equipmentName", EquipmentName)
                    .SetResultTransformer(Transformers.AliasToEntityMap).List();
            }
            catch 
            {
                return null;
            }
        }
    }
}
